package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Supplier;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface SupplierDao {
    //分页查询供应商
    Page<Supplier> listSelect(@Param("supplierName") String supplierName);

    //修改供应商
//    void updateSupplier(@Param("supplierId") int supplierId,@Param("supplier") Supplier supplier);
    void updateSupplier(Supplier supplier);

    //新增供应商
    void saveSupplier(Supplier supplier);

    //删除供应商
    void deleteSupplier(String id);

    //供应商下拉列表查询 String q（供应商名称模糊查询）
    List<Supplier> getComboboxList(@Param("q") String q);

    //根据supplierId查询供应商编号
    Supplier selectById(@Param("supplierId") Integer supplierId);
}
